<?php
/**
 * The Template for displaying all single posts.
 *
 * @package WordPress
 * @subpackage WhitePaper
 * @since WhitePaper
 */

get_header(); ?>
	<section id="single" class="content">
			<?php if (have_posts()) : ?>
			<?php while (have_posts()) : the_post(); ?>
			<article id="post-<?php the_ID(); ?>" class="entry">
				<header class="entry-head">
					<div class="meta-date">
						<span class="meta-month"><?php the_time('M'); ?></span>
						<br />
						<span class="meta-day"><?php the_time('jS'); ?></span>
					</div>
					<h2 class="entrytitle" id="post-<?php the_ID(); ?>">
						<a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
					</h2>
					<p>
						<span class="meta-time">Year <?php the_time('Y'); ?></span>
						<span>|</span>
						<span class="meta-author"><?php the_author_link(); ?></span>
						<span>|</span>
						<span class="meta-category"><?php the_category(', ') ?></span>
					</p>
				</header>
				<section class="entry-body">
					<?php the_content('Read the rest of "'.the_title('', '', false).'" &raquo;'); ?>
				</section>
				<footer>
				<p>
						<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
							// both comments and pings open ?>
						<?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
							// only pings are open ?>
							评论已关闭。
						<?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
							// comments are open, pings are not ?>
						<?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
							// neither comments nor pings are open ?>
							评论和trackback已关闭。
						<?php } edit_post_link('Edit this entry','','.'); ?>
				</p>
				</footer>
				<div class="navigation">
					<span class="nav_pre"><?php previous_post_link('&laquo;%link') ?></span>
					<span class="nav_next"><?php next_post_link('%link &raquo;') ?></span>
				</div>
				<div class="comments-template">
					<?php comments_template(); ?>
				</div>
			</article>

			<?php endwhile; ?>
			<?php else : ?>
			<article>
				<h1><?php _e('Not Found'); ?></h1>
				<?php get_search_form(); ?>
			</article>
			<?php endif; ?>
	</section>
<?php get_footer(); ?>